Skip to content

Conversation

panchenko
Copy link
Contributor

Change list

Make sure httpClientFactory in AppiumCommandExecutor is not null.

Types of changes

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Details

version 9.5.0, code is like below

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("webSocketUrl", true);
driver = new AndroidDriver(AppiumClientConfig.defaultConfig().baseUri(URI.create(url)), capabilities);

throws

Exception in thread "main" java.lang.NullPointerException: 
Cannot invoke "org.openqa.selenium.remote.http.HttpClient$Factory.createClient(org.openqa.selenium.remote.http.ClientConfig)"
because the return value of "io.appium.java_client.remote.AppiumCommandExecutor.getHttpClientFactory()" is null
	at io.appium.java_client.AppiumDriver.initBiDi(AppiumDriver.java:423)
	at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:344)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:173)
	at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:101)
	at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:109)
	at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:223)

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 8, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@mykola-mokhnach mykola-mokhnach changed the title fix possible NPE in initBiDi() fix: Possible NPE in initBiDi() Aug 9, 2025
@mykola-mokhnach
Copy link
Contributor

@mykola-mokhnach mykola-mokhnach merged commit 75ee094 into appium:master Aug 12, 2025
6 of 7 checks passed
@KazuCocoa KazuCocoa added the size:S contribution size: S label Sep 1, 2025
@KazuCocoa
Copy link
Member

Hi @panchenko, congrats: the Appium project wants to compensate you for this contribution! Please reply to this comment mentioning @jlipps and @KazuCocoa and sharing your OpenCollective account name, so that we can initiate payment! Or let us know if you decline to receive compensation via OpenCollective. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S contribution size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants